package org.lanqiao.tjut.pizzastore;

import org.lanqiao.tjut.pizzas.Pizza;

public abstract class PizzaStore {

	// SimplePizzaFactory factory;
	// public PizzaStore(SimplePizzaFactory factory) {
	// this.factory = factory;
	// }
	
	abstract Pizza creatPizza(String type);

	public Pizza orderPizza(String type) {
		// Pizza pizza;
		// pizza = factory.CreatePizza(type);
		Pizza pizza = creatPizza(type);
		pizza.prepare();
		pizza.bake();
		pizza.cut();
		pizza.box();

		return pizza;
	}
}
